package com.mzkj.wanjulaile.mobile.api.modules.shoppingCart.mapper;

import com.mzkj.wanjulaile.mobile.api.modules.shoppingCart.entity.ShoppingCart;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 购物车DAO接口
 * @author ianly
 * @version 2016-10-17
 */
@Repository
public interface ShoppingCartMapper  {


    /**
     * 根据玩具id和用户id删除购物车
     * @param toyIds
     * @param accountId
     */
    void batchDelete(@Param("toyIds") List<String> toyIds, @Param("accountId") String accountId);

    void batchDeleteByIds(List<String> ids);

    int deleteByAccountId(Long accountId);

    List<ShoppingCart> findListByIds(List<String> ids);

    List<ShoppingCart> findListByAccountId(ShoppingCart shoppingCart);

    List<ShoppingCart> getByAcIdToyId(ShoppingCart shoppingCart);


    List<ShoppingCart> findList2ByAccountId(String accountId);

    ShoppingCart get(String id);

    ShoppingCart get (ShoppingCart shoppingCart);

    List<ShoppingCart> findList(ShoppingCart shoppingCart);

    void delete(ShoppingCart shoppingCart);

    void update(ShoppingCart shoppingCart);

    void  insert(ShoppingCart shoppingCart);
}